<template>

    <el-container>
      <el-header>
      <el-menu default-active="1" class="el-menu-demo" mode="horizontal">
        <el-menu-item index="1">测试平台</el-menu-item>
      </el-menu></el-header
    >

      <el-container>
        <el-aside width="200px">
          <el-menu
          :default-active="activeIndex2"
          class="el-menu-demo"
          @select="handleSelect"
        >
            <el-menu-item index="1" @click="goTo('/index/testcase')"
              ><el-icon><List /></el-icon>测试用例</el-menu-item
            >
            <el-menu-item index="2" @click="goTo('/index/task')"
              ><el-icon><Flag /></el-icon>测试任务</el-menu-item
            >
          </el-menu>
        </el-aside>
        <el-container>
          <el-main>
            <router-view></router-view>
          </el-main>
        </el-container>
      </el-container>
    </el-container>
</template>
  
<script setup>
import { useRouter } from "vue-router";

const router = useRouter();

// 路由跳转
const goTo = (path) => {
  router.push(path);
};
</script>

<style scoped>
.el-container {
  height: 100%;
}

.el-header {
  padding: 0;
}

.el-aside > ul {
  height: 100%;
}

.flex-grow {
  flex-grow: 1;
}
</style>